package com.usc.csci588.chaltrojan.login;


public class Constants {
	
	public static final String CONSUMER_KEY = "p1Y4B1w651I0oWPdN5fAQQ";
	public static final String CONSUMER_SECRET= "INCya0CinfBUokLFrbshi84OszLZfOk0AEobLEaxs";
	
	public static final String REQUEST_URL = "https://api.twitter.com/oauth/request_token";
	public static final String ACCESS_URL = "https://api.twitter.com/oauth/access_token";
	public static final String AUTHORIZE_URL = "http://api.twitter.com/oauth/authorize";
	
	public static final String	OAUTH_CALLBACK_SCHEME	= "app";
	public static final String	OAUTH_CALLBACK_HOST		= "twitter";
	public static final String	OAUTH_CALLBACK_URL		= OAUTH_CALLBACK_SCHEME + "://" + OAUTH_CALLBACK_HOST;	
	
	public static final String ChalTrojanHostName = "http://ec2-23-22-128-131.compute-1.amazonaws.com:8080";	
	
	public static final String mainUIRequestedFrom = "main_ui_request_made";
	public static final Integer mainUIFromCreateTrip = 1;
	public static final Integer mainUIFromJoinTrip = 2;
	public static final Integer mainUIFromUnjoinTrip = 3;
	public static final Integer mainUIFromNewTrip = 4;
	public static final Integer mainUIFromUpdateTrip = 5;
	
	public static final Integer roundOffPlacesForLatLong = 5;
	
	public static final String TripName = "tripName";
	public static final String Lat_Lng = "Lat_Lng";
	
	public static final String HandleArray = "handleArray";
	public static final String latArray= "latArray";
	public static final String longArray = "longArray";
	
	public static final String AddrSting = "AddressString";
	
	public static final String YourLocationMsg = "This is you!!";
	public static final String DestinationMsg = "This is current destination!!";
	
	public static String makeLocationString(String uname){
		return "@"+uname+"";
	}
	
	public static double round(double value, int places) {
	    if (places < 0) throw new IllegalArgumentException();

	    long factor = (long) Math.pow(10, places);
	    value = value * factor;
	    long tmp = Math.round(value);
	    return (double) tmp / factor;
	}
	
	public static double round(double value) {
		return round(value, roundOffPlacesForLatLong);
	}
	
}